import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: xiaotutu
 * Date: 2024-03-19
 * Time: 9:38
 */
public class Test {

    public static void func(String str1, String str2) {
        List<Character> list = new ArrayList<>();
        for (int i = 0; i < str1.length(); i++) {
            char ch = str1.charAt(i);
            if(!str2.contains(ch + "")) {
                list.add(ch);
            }
        }
        for (Character s:list) {
            System.out.print(s);
        }
    }

    public static void main(String[] args) {
        func("welcome to bit","come");
    }

    public static void main3(String[] args) {
        List<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(3);
        list.add(4);
        list.add(5);
        /*for (int i = 0; i < list.size(); i++) {
            System.out.print(list.get(i) + " ");
        }*/
        /*for (Integer x: list) {
            System.out.print(x + " ");
        }*/
        Iterator<Integer> it = list.listIterator();
        while(it.hasNext()) {
            System.out.print(it.next() + " ");
        }
    }

    public static void main2(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("123");
        list.add("12323");
        list.add("12231");
        list.add("1212312");
        list.add("1213123");
        List<String> ret = list.subList(1,3);
        ret.set(1,"asjd");
    }

    public static void main1(String[] args) {
        // ArrayList<Integer> arrayList1 = new ArrayList();
        ArrayList<String> arrayList2 = new ArrayList();
        arrayList2.add("abc");
        arrayList2.add("efg");
        List<String> list = new ArrayList<>(arrayList2);
        list.add("hij");
        list.addAll(arrayList2);
        boolean ret = list.remove("abc");
        System.out.println(ret);
    }
}
